import {reqPayMent,reqPaySate} from '@/api'
let state={
  payList:{},
 
}
let actions={
  //获取支付信息
 async getPayment(context,orderId){
     let result= await reqPayMent(orderId)
      console.log(result)
     if(result.code==200){
       context.commit('GETPAYMENT',result.data)
     }
  },
  //获取支付状态
 async getPaySate(context,orderId){

     let result=  await  reqPaySate(orderId)
       console.log(result)
     if(result.code==200){
       return result.code
     }else{
      return result.code
     }
  }
}
let mutations={
  GETPAYMENT(state,payList){
    
    state.payList=payList
  },
 
}

let getters={

}
export default{
  state,
  actions,
  mutations,
  getters
}